-- GENERATED SPELL FOR [Nightmare Suppressor] --


function spell0_8497(pUnit, Event) --@Summoned Demon,Self--
pUnit:FullCastSpellOnTarget(7741,pUnit)
pUnit:RegisterEvent('Sorts_8497', 548, 1)
end

function spell1_8497(pUnit, Event) --@Suppression,n/a--
pUnit:FullCastSpellOnTarget(12623,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8497', 607, 1)
end

function Sorts_8497(pUnit, Event)
local choix_sorts_8497 = math.random(0, 1)
if choix_sorts_8497 == 0 then
pUnit:RegisterEvent('spell0_8497', 1, 1)
end
if choix_sorts_8497 == 1 then
pUnit:RegisterEvent('spell1_8497', 1, 1)
end
end

function mob8497_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8497', math.random(1500, 3000), 1)
end

function mob8497_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8497_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8497_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8497, 1, 'mob8497_Action')
RegisterUnitEvent(8497, 2, 'mob8497_Leave')
RegisterUnitEvent(8497, 3, 'mob8497_Kill')
RegisterUnitEvent(8497, 4, 'mob8497_Die')
